<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  

  
  <title>CDH+esgynDB 修改ip | shouzimu</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="版本情况 12cdh: 5.16.2esgyndb: 1.6.2   注：测试环境使用 使用cdh在虚拟机中安装的esgyndb，后续由于切换ip，导致访问异常，此处将处理过程记录 1.查看postgresql的scm用户的密码 1grep password &#x2F;etc&#x2F;cloudera-scm-server&#x2F;db.properties    2.登录postgresql数据库 1select ho">
<meta property="og:type" content="article">
<meta property="og:title" content="CDH+esgynDB 修改ip">
<meta property="og:url" content="https://shouzimu.gitee.io/2020/11/12/cdh-esgyn-change-ip/index.html">
<meta property="og:site_name" content="shouzimu">
<meta property="og:description" content="版本情况 12cdh: 5.16.2esgyndb: 1.6.2   注：测试环境使用 使用cdh在虚拟机中安装的esgyndb，后续由于切换ip，导致访问异常，此处将处理过程记录 1.查看postgresql的scm用户的密码 1grep password &#x2F;etc&#x2F;cloudera-scm-server&#x2F;db.properties    2.登录postgresql数据库 1select ho">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://modprobe.oss-cn-beijing.aliyuncs.com/gitee/cdh_pg.png">
<meta property="article:published_time" content="2020-11-12T11:06:28.000Z">
<meta property="article:modified_time" content="2020-11-12T11:34:35.731Z">
<meta property="article:author" content="shouzimu">
<meta property="article:tag" content="esgynDB">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://modprobe.oss-cn-beijing.aliyuncs.com/gitee/cdh_pg.png">
  
    <link rel="alternate" href="/atom.xml" title="shouzimu" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  
<link rel="stylesheet" href="/css/style.css">

<meta name="generator" content="Hexo 5.2.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">shouzimu</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="https://shouzimu.gitee.io"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-cdh-esgyn-change-ip" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2020/11/12/cdh-esgyn-change-ip/" class="article-date">
  <time datetime="2020-11-12T11:06:28.000Z" itemprop="datePublished">2020-11-12</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      CDH+esgynDB 修改ip
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>版本情况</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">cdh: 5.16.2</span><br><span class="line">esgyndb: 1.6.2</span><br></pre></td></tr></table></figure>

<p><strong><font color=#FF0000> 注：测试环境使用</font></strong></p>
<p>使用cdh在虚拟机中安装的esgyndb，后续由于切换ip，导致访问异常，此处将处理过程记录</p>
<p>1.查看postgresql的scm用户的密码</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">grep password /etc/cloudera-scm-server/db.properties</span><br></pre></td></tr></table></figure>



<p>2.登录postgresql数据库</p>
<figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">select</span> host_id, host_identifier, <span class="keyword">name</span>, ip_address <span class="keyword">from</span> <span class="keyword">hosts</span>;</span><br></pre></td></tr></table></figure>

<p><img src="https://modprobe.oss-cn-beijing.aliyuncs.com/gitee/cdh_pg.png"></p>
<p>3.修改postgresql数据库中的数据（即主机的ip）</p>
<figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">update</span> <span class="keyword">hosts</span> <span class="keyword">set</span> (ip_address) = (<span class="string">&#x27;new ip地址&#x27;</span>) <span class="keyword">where</span> host_id=<span class="string">&#x27;1&#x27;</span>;</span><br></pre></td></tr></table></figure>



<p>4.重启服务</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">service cloudera-scm-server-db restart</span><br><span class="line">service cloudera-scm-server restart</span><br><span class="line">service cloudera-scm-agent restart </span><br></pre></td></tr></table></figure>



<p>5.重启esgyndb后遇到一个问题，dcs返回的mxoserver仍然是老的ip，导致jdbc连接失败，处理如下</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">/opt/apache-zookeeper-3.5.8-bin/bin/zkCli.sh </span><br><span class="line"></span><br><span class="line">删除trafodion在zk上的注册信息</span><br><span class="line">rmr /trafodion  </span><br><span class="line"></span><br><span class="line">启动数据库</span><br><span class="line">sqstart</span><br></pre></td></tr></table></figure>


      
    </div>
    <footer class="article-footer">
      <a data-url="https://shouzimu.gitee.io/2020/11/12/cdh-esgyn-change-ip/" data-id="ckheq8soy0001zoize7ne6xi8" class="article-share-link">Share</a>
      
      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/esgynDB/" rel="tag">esgynDB</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2020/11/12/k8s-single/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          Centos7安装单节点kubernetes
        
      </div>
    </a>
  
  
    <a href="/2020/11/12/hello-world/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">Hello World</div>
    </a>
  
</nav>

  
</article>

</section>
        
          <aside id="sidebar">
  
    

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="/tags/cloud/" rel="tag">cloud</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/elasticsearch/" rel="tag">elasticsearch</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/esgynDB/" rel="tag">esgynDB</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/java/" rel="tag">java</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/os/" rel="tag">os</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/tags/cloud/" style="font-size: 10px;">cloud</a> <a href="/tags/elasticsearch/" style="font-size: 10px;">elasticsearch</a> <a href="/tags/esgynDB/" style="font-size: 10px;">esgynDB</a> <a href="/tags/java/" style="font-size: 10px;">java</a> <a href="/tags/os/" style="font-size: 10px;">os</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/11/">十一月 2020</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2020/11/12/essync/">es+canal+logstash优化用户查询</a>
          </li>
        
          <li>
            <a href="/2020/11/12/centos-static-ip/">centos配置静态ip</a>
          </li>
        
          <li>
            <a href="/2020/11/12/remote-debug/">idea远程调试</a>
          </li>
        
          <li>
            <a href="/2020/11/12/k8s-single/">Centos7安装单节点kubernetes</a>
          </li>
        
          <li>
            <a href="/2020/11/12/cdh-esgyn-change-ip/">CDH+esgynDB 修改ip</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2020 shouzimu<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css">

  
<script src="/fancybox/jquery.fancybox.pack.js"></script>




<script src="/js/script.js"></script>




  </div>
</body>
</html>